package com.xian.branch;

public class SwitchDemo1 {
    public static void main(String[] args) {
          //目标：switch流程  if功能远远大于Switch  if适合区间匹配  Switch适合值匹配，代码优雅----

        //表达式类型只能用byte、short、int、char,,,,,jdk5开始支持枚举，，，jdk7开始支持String,,,,不支持double、float、long

        String weekday = "周五";
        switch (weekday){
            case "周一":
                System.out.println("1111111111");
                break;
            case "周二":
                System.out.println("22222222");
                break;
            case "周三":
                System.out.println("333333");
                break;
            case "周四":
                System.out.println("4444444444");
                break;
            case "周五":
                System.out.println("555555555555555");
                break;
            default:
                System.out.println("数据有误！！！！");
        }
    }
}
